﻿package com.mixmedia.view.status {
	import flash.display.DisplayObject;
	import flash.display.DisplayObjectContainer;
	import flash.display.MovieClip;	

	/**
 * @author Colin
 */
	final public class BindMovieClip {
		public static var PROGRESS:String='Preloader';
		public static var ERROR:String='ErrorIcon';
		public static var TOOLTIP:String='toolTips';
	
		public static function make(type:String,attachMC:DisplayObjectContainer,id:String,initObj:Object):DisplayObject{
			if(id==undefined)id=type;
			return new MovieClip();//attachMC.attachMovie(id,type,1000,initObj);
		}
	
		public static function remove(type:String,attachMC:DisplayObjectContainer) : void {
			if(attachMC[type] is IStatusIcon){
				IStatusIcon(attachMC[type]).kill();
				return;
			}
	
			attachMC[type].removeMovieClip();	
		}
	}
}